#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "NamedElement.h"
#include "RedefinableElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class UseCase;

/// <summary>
/// ExtensionPoint
/// An ExtensionPoint identifies a point in the behavior of a UseCase where that
/// behavior can be extended by the behavior of some other (extending) UseCase, as
/// specified by an Extend relationship.
/// </summary>
class UMLMODEL_EXPORT ExtensionPoint : public NamedElement, public RedefinableElement {

public: // Constructors and destructors
    explicit ExtensionPoint(const QString& umlType="uml::ExtensionPoint");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// useCase getter
    /// The UseCase that owns this ExtensionPoint.
    /// </summary>
    shared_ptr<UseCase> useCase() const;

    /// <summary>
    /// useCase setter
    /// The UseCase that owns this ExtensionPoint.
    /// </summary>
    void setUseCase(shared_ptr<UseCase> value);

private: // Fields
    /// <summary>
    /// useCase
    /// The UseCase that owns this ExtensionPoint.
    /// </summary>
    shared_ptr<UseCase> useCase_;

};

} // namespace uml
